package com.rui.study.micro.userself.util;

import com.rui.study.commons.model.GlobalStatus;
import lombok.Getter;

@Getter
public enum StatusCode implements GlobalStatus {
    SUCCEED                             ("00000000", "success"),
    SYSTEM_EXCEPTION                    ("US-99999999", "系统异常:%s"),
    ILLEGAL_PARAMETER                   ("UA-10010001", "参数错误"),

    INSERT_EXCEPTION                    ("UA-90010001", "插入数据异常"),
    UPDATE_EXCEPTION                    ("UA-90010005", "更新数据异常"),
    DELETE_EXCEPTION                    ("UA-90010010", "删除数据异常"),

    VERIFY_CODE_IS_WRONG                ("US-30010001", "验证码错误"),
    ACCOUNT_ALREADY_IN_USED             ("US-30010015", "账号已被使用"),
    NOT_SUPPORT_ACCOUNT                 ("US-30010020", "不支持的账号"),
    USERNAME_MAXIMUM_NUMBER_REACHED     ("US-30010025", "当日注册用户到达上限"),
    RELEASE_LOCK_FAILED                 ("US-30010030", "分布式方法%s锁释放失败"),

    KEY_MANAGE_NOT_AVAILABLE            ("US-30020001", "秘钥服务暂时不可用"),


    ;

    private String status;

    private String message;

    StatusCode(String status, String message) {
        this.status = status;
        this.message = message;
    }

}
